home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 February / PCWorld_2008-02_cd.bin / v cisle / pcwremove / pcwRemoveHyperlinks.exe / pcwRemoveHyperlinks.txt
Text File  |  2007-12-09  |  475b  |  17 lines

  1. Sub pcwRemoveHyperlinks
  2. Dim oDoc,FandR,oFound
  3. oDoc = ThisComponent
  4. FandR = oDoc.createSearchDescriptor
  5. FandR.ValueSearch = False
  6. Dim args(0) as new com.sun.star.beans.PropertyValue
  7. args(0).Name = "HyperLinkEvents"
  8. args(0).Value = ""
  9. FandR.SetSearchAttributes(args())
  10. oFound = oDoc.FindFirst(FandR)
  11. While Not isNull(oFound)
  12.  oFound.HyperLinkURL = ""
  13.  oFound.HyperLinkName = ""
  14.  oFound.HyperLinkTarget = ""
  15.  oFound = oDoc.FindNext(oFound.End,FandR)
  16. Wend
  17. End Sub